<!DOCTYPE html>
<html>
<head>
    <title>NavBar usage</title>
    <meta charset="utf-8">
    <link href="../content/shared/styles/examples-offline.css" rel="stylesheet">
    <link href="../../styles/kendo.common.min.css" rel="stylesheet">
    <link href="../../styles/kendo.rtl.min.css" rel="stylesheet">
    <link href="../../styles/kendo.default.min.css" rel="stylesheet">
    <link href="../../styles/kendo.dataviz.min.css" rel="stylesheet">
    <link href="../../styles/kendo.dataviz.default.min.css" rel="stylesheet">
    <link href="../../styles/kendo.mobile.all.min.css" rel="stylesheet" />
    <script src="../../js/jquery.min.js"></script>
    <script src="../../js/kendo.all.min.js"></script>
    <script src="../content/shared/js/console.js"></script>
    <script>
        
    </script>
    
    
</head>
<body>
    
        <a class="offline-button" href="../index.html">Back</a>
    
    <div data-role="view" id="buttongroup-navbar" data-init="initNameSource">
    <header data-role="header">
        <div data-role="navbar">
            <ul data-role="buttongroup" data-index="0" data-select="regroup">
                <li>
                    By Name
                </li>
                <li>
                    By Family
                </li>
            </ul>
            <a data-align="right" data-role="button" class="nav-button" href="#/">Index</a>
        </div>
    </header>
    <ul data-role="listview" data-type="group" data-source="nameSource" data-template="nameTemplate" data-fixed-headers="true">
    </ul>
</div>


<script>
    nameSource = kendo.data.DataSource.create({
        data: [
                  { firstName: "Ann", lastName: "Devon", firstLetter: "A", lastLetter: "D", photo: '@Url.Content("../content/mobile/overview/ann.jpg")' },
                  { firstName: "Annette", lastName: "Roulet", firstLetter: "A", lastLetter: "R", photo: '@Url.Content("../content/mobile/overview/annette.jpg")' },
                  { firstName: "Antonio", lastName: "Moreno", firstLetter: "A", lastLetter: "M", photo: '@Url.Content("../content/mobile/overview/antonio.jpg")' },
                  { firstName: "Carine", lastName: "Schmitt", firstLetter: "C", lastLetter: "S", photo: '@Url.Content("../content/mobile/overview/carine.jpg")' },
                  { firstName: "Catherine", lastName: "Dewey", firstLetter: "C", lastLetter: "D", photo: '@Url.Content("../content/mobile/overview/catherine.jpg")' },
                  { firstName: "Daniel", lastName: "Tonini", firstLetter: "D", lastLetter: "T", photo: '@Url.Content("../content/mobile/overview/daniel.jpg")' },
                  { firstName: "Diego", lastName: "Roel", firstLetter: "D", lastLetter: "R", photo: '@Url.Content("../content/mobile/overview/diego.jpg")' },
                  { firstName: "Eduardo", lastName: "Saavedra", firstLetter: "E", lastLetter: "S", photo: '@Url.Content("../content/mobile/overview/eduardo.jpg")' },
                  { firstName: "Elizabeth", lastName: "Brown", firstLetter: "E", lastLetter: "B", photo: '@Url.Content("../content/mobile/overview/elizabeth.jpg")' },
                  { firstName: "Felipe", lastName: "Izquierdo", firstLetter: "F", lastLetter: "I", photo: '@Url.Content("../content/mobile/overview/felipe.jpg")' },
                  { firstName: "Fran", lastName: "Wilson", firstLetter: "F", lastLetter: "W", photo: '@Url.Content("../content/mobile/overview/fran.jpg")' },
                  { firstName: "Francisco", lastName: "Chang", firstLetter: "F", lastLetter: "C", photo: '@Url.Content("../content/mobile/overview/francisco.jpg")' }
              ],
        group: "firstLetter"
    });

    function regroup() {
        nameSource.group(this.selectedIndex ? "lastLetter" : "firstLetter");
    }
</script>

<script id="nameTemplate" type="text/x-kendo-template">
    <h2>#:firstName# #:lastName#</h2><img src="#:photo#" />
</script>

<style scoped>
    #buttongroup-navbar h2 {
        display: inline-block;
        font-size: 1.1em;
        margin: 1em 0 .5em 1em;
    }
    #buttongroup-navbar img {
    	float: left;
        width: 4em;
        height: 4em;
        margin: 0;
        border: 1px solid rgba(0,0,0,.2);
	-webkit-border-radius: 4em;
	border-radius: 4em;
    }
</style>


    
    <script>
        window.kendoMobileApplication = new kendo.mobile.Application(document.body);
    </script>
    
    
</body>
</html>
